<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Restoring Dameng">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="dameng-00045.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
<meta name="DC.Publisher" content="20241029">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="dameng-00048">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Restoring Dameng</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="dameng-00048"></a><a name="dameng-00048"></a>

<h1 class="topictitle1">Restoring Dameng</h1>
<div><p>This section describes how to restore a Dameng backup set that has been backed up to the original location or a new location.</p>
<div class="section"><h4 class="sectiontitle">Context</h4><div class="p">Backup, archive, and replication copies can be used for restoration. Restoration to the original or a new location is supported.<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>Replication copies and their archive copies cannot be used for restoration to the original location.</p>
</div></div>
</div>
</div>
<div class="section" id="dameng-00048__section13258102544115"><h4 class="sectiontitle">Prerequisites</h4><ul id="dameng-00048__ul155946913719"><li id="dameng-00048__li178221624154012">Before restoration, ensure that the remaining space of the data directory at the target location for restoration is greater than the size of the copy used for restoration before reduction. Otherwise, restoration will fail.</li></ul>
<ul id="dameng-00048__ul1648381342319"><li id="dameng-00048__li69561792311">Before restoring data to a new location, ensure that the database installation user has the read and write permissions on the target path of restoration.</li><li id="dameng-00048__li97319774218">If the resource to be restored is an active/standby MPP cluster, ensure that the active/standby database information is correct before stopping the database. Otherwise, you need to scan the restoration target resource.</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Choose <span class="uicontrol" id="dameng-00048__en-us_topic_0000001839142377_uicontrol11808134865610"><b><span id="dameng-00048__en-us_topic_0000001839142377_text1680804813566"><strong>Explore</strong></span> &gt; <span id="dameng-00048__en-us_topic_0000001839142377_text18808144820567"><strong>Copy Data</strong></span> &gt; <span id="dameng-00048__en-us_topic_0000001839142377_text19349625124914"><strong>Databases</strong></span> &gt; <span id="dameng-00048__en-us_topic_0000001839142377_text166390482814"><strong>Dameng</strong></span></b></span>.</span></li><li><span>You can search for copies by Dameng backup set resource or copy. This section describes how to search for copies by resource.</span><p><p>On the <span class="uicontrol"><b><span><strong>Resources</strong></span></b></span> tab page, locate the resource to be restored by resource name and click the name.</p>
</p></li><li><span>Select the year, month, and day in sequence to find copies.</span><p><p>If <span><img src="en-us_image_0000002010701196.png"></span> is displayed below a month or date, copies exist in the month or on the day.</p>
</p></li><li><span>Click <span><img src="en-us_image_0000002046860077.png"></span> to go to the <strong>Copy Data</strong> page.</span></li><li><span>Specify a copy or a point in time for restoration.</span><p><ul><li>Restoration using a specified copy<p>In the row of the target copy, choose <span class="menucascade"><b><span class="uicontrol"><span><strong>More</strong></span></span></b> &gt; <b><span class="uicontrol"><span><strong>Restore</strong></span></span></b></span>.</p>
<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>If <span class="parmname"><b>Type</b></span> of the Dameng database is <span class="parmvalue"><b>Single Server</b></span>, click <span><img src="en-us_image_0000002085038869.png"></span> on the copy data page to switch to the list mode.</p>
</div></div>
</li><li>Restoration to a specified point in time<p>On the <strong>Copy Data</strong> page, click <span><img src="en-us_image_0000001988782784.png"></span>. In the blue part on the timeline, select a copy and choose <span class="menucascade"><b><span class="uicontrol"><span><strong>More</strong></span></span></b> &gt; <b><span class="uicontrol"><span><strong>Restore</strong></span></span></b></span>.</p>
<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>This operation is supported only when <span class="parmname"><b>Type</b></span> of the Dameng database is <span class="parmvalue"><b>Single Server</b></span>.</p>
</div></div>
</li></ul>
<div class="p"><a href="#dameng-00048__table194961441141219">Table 1</a> describes the related parameters.
<div class="tablenoborder"><a name="dameng-00048__table194961441141219"></a><a name="table194961441141219"></a><table cellpadding="4" cellspacing="0" summary="" id="dameng-00048__table194961441141219" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Dameng database restoration parameters</caption><colgroup><col style="width:21.44%"><col style="width:15.690000000000001%"><col style="width:62.870000000000005%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="21.44%" id="mcps1.3.4.2.5.2.2.2.2.4.1.1"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.690000000000001%" id="mcps1.3.4.2.5.2.2.2.2.4.1.2"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.870000000000005%" id="mcps1.3.4.2.5.2.2.2.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" rowspan="7" valign="top" width="21.44%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Dameng Single Server</strong></span></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</td>
<td class="cellrowborder" valign="top" width="15.690000000000001%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p><span><strong>Restore To</strong></span></p>
</td>
<td class="cellrowborder" valign="top" width="62.870000000000005%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.3 "><p>Select either <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> or <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Location</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>If you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span>, the target location is displayed by default.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><strong>Tag</strong></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>Select a tag if <strong>Restore To</strong> is set to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Target Host</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>Specify the target host for restoration if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Target Path</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>Enter the target path for restoration if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>. The installation user of the target database must have the write permission on the path.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Database Name</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>Name the restored database if you set <strong>Restore To</strong> to <span><strong>New location</strong></span>.</p>
<div class="note"><span class="notetitle"> NOTE: </span><div class="notebody"><ul><li>If the database name is the same as that of the database in the target path, the system overwrites the data in the database with the same name.</li><li>If the database name is the same as that of the database in another path on the target host for restoration, the restoration fails.</li><li>If the name does not exist, the system creates a database in the target path.</li></ul>
</div></div>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Database Port</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p></p>
<div class="p">This parameter can be specified if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.<ul><li>If this parameter is set and a database exists in the target path for restoration, the system overwrites the port of the original database during restoration.</li><li>If this parameter is not set and no database exists in the target path for restoration, the default port number of the newly restored database is <strong>5236</strong>.</li></ul>
</div>
</td>
</tr>
<tr><td class="cellrowborder" rowspan="3" valign="top" width="21.44%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><strong>Active/standby MPP cluster</strong></p>
<div class="note"><span class="notetitle"> NOTE: </span><div class="notebody"><p>In 1.5.0, the value is <strong>MPP Cluster</strong>.</p>
</div></div>
<p></p>
</td>
<td class="cellrowborder" valign="top" width="15.690000000000001%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p><span><strong>Restore To</strong></span></p>
</td>
<td class="cellrowborder" valign="top" width="62.870000000000005%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.3 "><p>Select either <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> or <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Location</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>If you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span>, the target location is displayed by default.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span><strong>Target Cluster</strong></span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>Specify the target cluster for restoration if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</p></li><li><span>Click <span class="uicontrol"><b>OK</b></span>.</span></li><li><span>Use PuTTY to log in to the host where the cluster is located.</span></li><li><span>Restore the control files of active and standby MPP clusters to be the same on the monitor.</span><p><ol type="a"><li>Run the following command to query the path to the monitor configuration file:<pre class="screen">find / -name dmmonitor.ini</pre>
<p>The command output similar to the following is displayed:</p>
<pre class="screen">[root@dm8_monitor_16183 ~]# find / -name dmmonitor.ini
/dm8/data/dmmonitor.ini</pre>
</li><li>Run the following command to log in to the monitor:<pre class="screen">su - dmdba -c "dmmonitor <em>Path to the monitor configuration file</em>"</pre>
<div class="p">Example:<pre class="screen">su - dmdba -c "dmmonitor /dm8/data/dmmonitor.ini"</pre>
</div>
</li><li>Run the following command to restore the control files of active and standby MPP clusters to be the same:<pre class="screen">recover mppctl</pre>
</li></ol>
<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul><li>After the restoration, if a node in the <span class="uicontrol"><b><span><strong>Offline</strong></span></b></span> state exists in the cluster, run the <strong>help</strong> command on the monitor to query the command for restarting the cluster and restart the cluster service.</li><li>When the resource to be restored is an active/standby MPP cluster, scan the restoration target resource after the restoration job is complete to ensure that the obtained active/standby database information is correct.</li></ul>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dameng-00045.html">Restoration</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>